1484237803 by Unknown

1484237803 by Unknown

Author:Unknown
Language: eng
Format: epub
Published: 2018-08-27T22:22:47+00:00


ChapTer 6 Bindings

Figure 6-22. Two CSS classes applied with an array

You can also use the object expression syntax to dynamically apply a class in an array. Listing 6-28 shows how to accomplish this. One thing to note is that we are applying the “error” class name as a string, not a reference, to the data property that holds the same value.

Listing 6-28. Dynamically Applying a CSS Class as Part of an Array

<input

type="text"

v-model="input"

v-bind:class="[{ 'error' : inputError }, activeClass]" />

122



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.